import service from '@/utils/request'
const pagebase = "/admin/emp"

// batchDelete
export function batchDelete(data){
    return service({
        url: pagebase + '/batchDelete',
        method: 'delete',
        headers:{
            "Content-Type":"application/json"
        },
        data
    })
}
export function deleteEmpById(empNo) {
    return service({
        url: pagebase + '/deleteEmpById/'+empNo,
        method: 'delete',
    })
}
//  /admin/emp/addEmp
export function addEmp(data){
    return service({
        url: pagebase + '/addEmp',
        method: 'post',
        headers:{
            "Content-Type":"application/json"
        },
        data
    })
}
export function findByPage(pageNum,pageSize,str){
    return service({
        url: pagebase + `/findByPage/${pageNum}/${pageSize}?${str}`,
        method: 'post',
        headers:{
            "Content-Type":"application/json"
        },
    })
}
export function findByPageSelFirst(str){
    return service({
        url: pagebase + `/findByPage/1/5?${str}`,
        method: 'post',
        headers:{
            "Content-Type":"application/json"
        },
    })
}
export function saveEmpDetails(data){
    return service({
        url: pagebase + '/saveEmpDetails',
        method: 'post',
        headers:{
            "Content-Type":"application/json"
        },
        data
    })
}
